<template>
  <el-dialog
    :close-on-click-modal="false"
    :title="isEdit ? '修改考评评语' : '新增考评评语'"
    width="800px"
    :footer="null"
    :visible.sync="visible"
  >
    <el-form :model="form" ref="form">
      <el-form-item label="评语模板名称">
        <el-input />
      </el-form-item>
      <el-form-item label="考评类型"></el-form-item>
      <el-form-item label="考评环节">
        <el-select clearable v-model="form.model">
          <el-option :value="0" label="自评" />
          <el-option :value="0" label="科室" />
          <el-option :value="0" label="党支部" />
          <el-option :value="0" label="纪委" />
        </el-select>
      </el-form-item>
      <el-form-item label="评语">
        <el-input />
      </el-form-item>
    </el-form>
    <div slot="footer">
      <el-button @click="visible = false">取消</el-button>
      <el-button type="primary">{{ isEdit ? '修改' : '新增' }}</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      isEdit: false,
      visible: false,
      form: {}
    }
  },
  methods: {
    edit(bool, row) {
      this.isEdit = bool
      this.form = Object.assign({}, row)
    }
  }
}
</script>
